<UserControl
  x:Class="ViewOnCore.Helper.WPF.IntellisenseTextBox"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:wpf="clr-namespace:ViewOnCore.Helper.WPF">

	<UserControl.Resources>
		<Style x:Key="IntellisenseListBox" TargetType="{x:Type ListBox}">
			<Setter Property="SnapsToDevicePixels" Value="True"/>
			<Setter Property="OverridesDefaultStyle" Value="True"/>
			<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
			<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
			<Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
			<Setter Property="Foreground" Value="{DynamicResource VOColor1A}"/>
			<Setter Property="FocusVisualStyle" Value="{x:Null}" />
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type ListBox}">
						<Border Background="{DynamicResource VOColor14}" Focusable="False">
							<ScrollViewer
							  Margin="1"
							  Focusable="False">
								<StackPanel IsItemsHost="True" Focusable="False"/>
							</ScrollViewer>
						</Border>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>

		<Style x:Key="{x:Type wpf:IntellisenseListBoxItem}" TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}">
		</Style>

	</UserControl.Resources>

	<Grid Focusable="False">
		<Grid.ColumnDefinitions>
			<ColumnDefinition/>
			<ColumnDefinition Width="18"/>
		</Grid.ColumnDefinitions>

		<TextBox x:Name="textBox"/>

		<Button x:Name="btnTagsDialog" Focusable="False" Margin="3,0,0,0" Height="18" Grid.Column="1">...</Button>

		<Popup
			x:Name="popup"
			Placement="Bottom"
			PlacementTarget="{Binding ElementName=textBox}"
			PopupAnimation="Fade"
			HorizontalOffset="10"
			VerticalOffset="-4"
			Opacity="0.9"
			MaxHeight="110"
			Focusable="False">
        <ListBox x:Name="lstSuggestions" Style="{StaticResource IntellisenseListBox}" />
		</Popup>
    
	</Grid>
</UserControl>
